1. Field of the Invention
The present invention relates to a control device for a vehicle including a nonvolatile memory which is electrically erasable and writable, and an error processing method in the control device for a vehicle.
2. Description of Related Art
WO 2004/031966 A discloses a method of controlling a nonvolatile memory when writing data into a nonvolatile memory including a plurality of physical blocks, the method including steps of: writing a fixed value into a first flag which is in a redundant area on a forefront page of the physical block and indicates whether or not data is written on the forefront page, the fixed value indicating that the data is written; and writing data into the physical block.
There is a problem that occurs in a control device for a vehicle which detects, on start-up, an error in the data written in the nonvolatile memory.
That is, when an abnormality due to power shutdown or the like occurs while writing data into the nonvolatile memory, the device would be reset without the error data being rewritten, thereby causing the error detection and the reset to be repeated and causing a system to not operate normally.